Prev Next

Atomicity:

Concurrent Data Access Without Blowing Up

Prev Next

Overview

Prev Next

What is Atomicity?

Prev Next

An example: Alice and Bob

Prev Next

Alice and then Bob

Prev Next

Bob and then Alice

Prev Next

Alice and Bob at the same time

Prev Next

Example 2: Incrementing a Shared Counter

Prev Next

PowerPC Instructions

lwzr3, gConnectCount(rtoc)Load address of gConnectCount into register r3.
lwzr4, 0(r3)Load integer from RAM into register r4.
addir4, r4, 1Add 1 to register r4.
stwr4, 0(r3)Store incremented value from register r4 back into RAM.
blr  Return from subroutine.

Prev Next

IncrementConnectCount() Once

Prev Next

IncrementConnectCount() Twice

Prev Next

IncrementConnectCount() Concurrently

Prev Next

Fighting the Window of Death

Prev Next

PowerPC Atomicity

Prev Next

68K Atomicity

Prev Next

Atomic Data Structures

Prev Next

Atomic Stacks

Prev Next

Atomic Stacks Are Easy to Corrupt

Prev Next

Atomic Locks